////
////  IJSImageAPIManager.h
////  JSPhotoSDK
////
////  Created by shan on 2017/5/31.
////  Copyright © 2017年 shan. All rights reserved.
////
//
//#import <Foundation/Foundation.h>
//#import <Photos/Photos.h>
//
//#define iOS7Later ([UIDevice currentDevice].systemVersion.floatValue >= 7.0f)
//#define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
//#define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
//#define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
//
//typedef NS_ENUM(NSUInteger, JSPhotoState) {
//    // 授权
//    JSAuthorizationStatusNotDetermined = 0, //未选择
//    JSAuthorizationStatusRestricted,        //用户受到某些限制，不能自己决定，比如：家长控制
//    JSAuthorizationStatusDenied,            // 用户明确拒绝
//    JSAuthorizationStatusAuthorized,         // 已经授权
//
//    // 创建
//    JSCreatedAlbumSuccess = 11,  // 创建相册成功
//    JSCreatedAlbumFail =12,        // 创建相册失败
//    JSSaveImageSuccess = 13,       // 保存图片成功
//    JSSaveImageFail = 14,              // 保存图片失败
//    JSPhotosNoNeed = 1000,       // 回调不需要状态
//};
///**
// *  存储的信息返回值
// *
// *  @param saveState 保存状态
// *  @param error 错误信息
// *
// */
//typedef void (^JSPhotoChangeHandler)(JSPhotoState saveState,NSError *error);
//
//typedef NS_ENUM(NSUInteger, JSAssetSourceType) {
//    JSAssetMediaTypePhoto = 0,
//    JSAssetMediaTypeLivePhoto,
//    JSAssetMediaTypePhotoGif,
//    JSAssetMediaTypeVideo,
//    JSAssetMediaTypeAudio
//};
///*
// *  纯原生数据管理类
// */
//
//@interface IJSImageAPIManager : NSObject
/////  PHFetchOptions
///* 包含iamge,默认是YES */
//@property(nonatomic,assign) BOOL isAllowPickingImage;
///* 包含Video,默认是YES */
//@property(nonatomic,assign) BOOL isAllowPickingVideo;
///* 包含voice,默认是YES */
//@property(nonatomic,assign) BOOL isAllowPickingAudio;
///* 包含gif,默认是YES */
//@property(nonatomic,assign) BOOL isAllowPickingGif;
///* 包含收藏, 默认是NO */
//@property(nonatomic,assign) BOOL includeHiddenAssets;
///* 包含连拍, 默认是NO */
//@property(nonatomic,assign) BOOL includeAllBurstAssets;
///* 最多请求的资源,默认是 0 不限制 */
//@property(nonatomic,assign) CGFloat fetchLimit;
///* 时间升序 */
//@property(nonatomic,assign) BOOL sortAscendingByModificationDate;
///**
// *  单利
// */
//+(instancetype) shareManager;
///**
// *  授权
// */
//+(JSPhotoState)authorizationStatus;
///*-----------------------------------获取 asset-------------------------------------------------------*/
///**
// *  获取所有的 相机胶卷的PHasset,返回具体的 asset对象
// */
//-(void)getAllAssetFromSourceType:(PHAssetSourceType)includeAssetSourceTypes sortDescriptors:(BOOL)sortDescriptors isAllowPickingImage:(BOOL)isAllowPickingImage isAllowPickingVideo:(BOOL)isAllowPickingVideo isAllowPickingAudio:(BOOL)isAllowPickingAudio isAllowPickingGif:(BOOL)isAllowPickingGif includeHiddenAssets:(BOOL)includeHiddenAssets  includeAllBurstAssets:(BOOL)includeAllBurstAssets fetchLimit:(NSInteger)fetchLimit completion:(void(^)(NSMutableArray *result))completion;
///**
// *  获取所有的相册,以及每一个相册对应的相册中的具体数据, 返回一个相册对象(包含里面的个数等信息,资源是PHFetchResult 类型)
// */
//-(void)getAllAssetFromAlbumSortDescriptors:(BOOL)sortDescriptors isAllowPickingImage:(BOOL)isAllowPickingImage isAllowPickingVideo:(BOOL)isAllowPickingVideo isAllowPickingAudio:(BOOL)isAllowPickingAudio isAllowPickingGif:(BOOL)isAllowPickingGif includeHiddenAssets:(BOOL)includeHiddenAssets  includeAllBurstAssets:(BOOL)includeAllBurstAssets completion:(void(^)(NSMutableArray<NSMutableDictionary *> *result))completion;
//
///*-----------------------------------PHFetchResult 对象解析成 PHAseet对象-------------------------------------------------------*/
///**
// *  将每一个相册的 PHFetchResult 对象解析成 PHAseet对象
// */
//- (void)getAssetsFromFetchResult:(id)result allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage ascending:(BOOL)ascending completion:(void (^)(NSArray<NSMutableDictionary *> *models))completion;
//// 获得下标为index的单个照片 如果索引越界, 在回调中返回 nil
//- (void)getAssetFromFetchResult:(id)result atIndex:(NSInteger)index allowPickingVideo:(BOOL)allowPickingVideo allowPickingImage:(BOOL)allowPickingImage ascending:(BOOL)ascending completion:(void (^)(NSMutableDictionary *model))completion;
//
///*-----------------------------------解析 PHAseet 成 UIImage对象-------------------------------------------------------*/
///**
// *  将 PHasset对象解析成我们需要的 UIImamge对象
// */
//-(void) getImageFromAsset:(PHAsset *)asset targetSizeWidth:(CGFloat)targetSizeWidth contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions *)options networkAccessAllowed:(BOOL)networkAccessAllowed completion:(void (^)(UIImage *photo,NSDictionary *info,BOOL isDegraded))completion progressHandler:(void (^)(double progress, NSError *error, BOOL *stop, NSDictionary *info))progressHandler;
//
///**
// *  保存图片到自定义的相册
// *
// *  @param image 需要保存的单张图片
// *  @param albumName 自定义相册的名字
// *  @param saveStateBlock 保存的状态和错误信息
// */
//+ (void) imageSaveIntoAlbumFromImage:(UIImage *)image albumName:(NSString *)albumName onSaveStateChanged:(JSPhotoChangeHandler)saveStateBlock;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//@end
